/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef __CIFS_QUICK_MODE_H
#include <linux/string.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ctype.h>
#include "cifsglob.h"

#ifdef CONFIG_ONT_NET_FEATURES
enum LocalSpeedDir {
	SPEED_DIR_INVALID = 0,
	SPEED_DIR_UP,
	SPEED_DIR_DOWN,
	SPEED_DIR_BOTH
};

struct quick_mode_para {
	uint32_t id;
	uint32_t srcIp;
	uint32_t destIp;
	ushort srcPort;
	ushort destPort;
};

struct tr143_pkt_ctrl {
	unsigned int mode;
	unsigned int sip;
	unsigned int dip;
	unsigned int proto;
	unsigned short sport;
	unsigned short dport;
	unsigned int owner;
	enum LocalSpeedDir speed_dir;
	unsigned int stack;
	struct in6_addr sipv6;
	struct in6_addr dipv6;
};

#define MAX_QUICK_PARA_NUMS 4
typedef unsigned int (*func_ffwd_tuple_accelerate)(struct tr143_pkt_ctrl *info, bool proc);
void add_ffwd_accelerate_stop(uint32_t id);
void check_for_add_ffwd_accelerate_start(struct TCP_Server_Info *server);
void clean_all_quick_para(void);
#else
static inline void add_ffwd_accelerate_stop(uint32_t id) {}
static inline void check_for_add_ffwd_accelerate_start(struct TCP_Server_Info *server) {}
static inline void clean_all_quick_para(void) {}
#endif

#endif
